package config;

import java.util.HashMap;
import java.util.Map;

public class PreferencesMap {
	
	private HashMap<String, String> prefs = new HashMap<String, String>();
	
	public String get(String prefName){
		return prefs.get(prefName);
	}
	
	public void set(String prefName, String prefValue){
		prefs.put(prefName, prefValue);
	}
	
	public void unset(String prefName){
		prefs.remove(prefName);
	}
	
	public boolean isSet(String prefName){
		return prefs.containsKey(prefName);
	}
	
	public Map<String, String> getMap(){
		return prefs;
	}
	
	public void setMap( Map<String, String> map ){
		if( map != null ){
			prefs.clear();
			prefs.putAll(map);
		}
	}
	
}
